////////////////////////////////////////////////////////////////////////////////
//
//  http://www.17nce.com
//  Copyright 2011-2012 
//  All Rights Reserved.
//
//  gtshao@sina.cn  2010-12-24
//
////////////////////////////////////////////////////////////////////////////////
package com.nce.controller{
	
	import com.nce.model.LsnProxy;
	import com.nce.view.BkwMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	

	public class StartupCommand extends SimpleCommand implements ICommand{
		
		override public function execute(notification:INotification):void{
			var lsnProxy:LsnProxy = new LsnProxy();
			facade.registerProxy(lsnProxy);
//
			var app:Nce = notification.getBody() as Nce;
			var term:int = app.bkw.termIdx;
			lsnProxy.getLessons(term+1);
			//app.bkw.lessonCbB.selectedIndex = app.bkw.lessonIdx;
//			trace(app.bkw.lessonIdx);
			facade.registerMediator( new BkwMediator(app.bkw) );
			
			
			
//			lsnProxy.getLsn(1,term);
			
		
		}
		
	}
}